package rattlesnake.callback.server.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpObject;
import io.netty.handler.codec.http.HttpRequest;
import rattlesnake.callback.aop.annotation.Handler;
import rattlesnake.callback.http.ResponseStatus;
import rattlesnake.callback.server.HandlerAdapter;
import rattlesnake.callback.util.HttpAsyncUtil;

/**
 * @Package: rattlesnake.callback.server.handler
 * @Description: 通用处理器,主要处理POST和GET方式回调
 * @author: liuxin
 * @date: 17/4/11 下午8:51
 */
@Handler(value = {"shenghuojiaofei"})
public class CommonMethHandler implements HandlerAdapter{
    /**
     * 调用
     * @param categoryUrl
     * @return
     */
    @Override
    public void forWard(ChannelHandlerContext ctx, HttpRequest request, HttpObject msg, String categoryUrl) {
        HttpAsyncUtil.doGetExecute(ctx,request, msg,categoryUrl, ResponseStatus.BLM_SUCCESS,ResponseStatus.BLM_ERROR);
    }

}
